package com.healthy.sport.demo.controller;


import com.healthy.sport.demo.entity.SysUser;
import com.healthy.sport.demo.mapper.SysUserMapper;
import com.healthy.sport.demo.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author chandler
 * @since 2020-11-10
 */
@RestController
@RequestMapping("/sys-user")
public class SysUserController {

//    @Autowired
//    private SysUserMapper sysUserMapper;

    @Autowired
    private SysUserService sysUserService;


    @GetMapping("/login")
    public String login(@RequestParam String schoolId,@RequestParam String username){

        SysUser sysUser = new SysUser();
        sysUser.setUserId("11");
        sysUser.setPassword("test3");
        sysUserService.save(sysUser);
//        sysUserMapper.insert(sysUser);

        return "success";
    }

}

